import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { PropupMsgReduxService } from "../../service/reduxstore/msg/msg.service";
import { MsgState } from "../../service/reduxstore/msg/msg.redux";
@Component({
    templateUrl: './layer.component.html',
    styleUrls: ['./layer.component.css']
})
export class LayerComponent implements OnInit {
    
    private msgState:MsgState;

    constructor(private propupMsgReduxService: PropupMsgReduxService, private router:Router) {

    }

    ngOnInit() {
        this.propupMsgReduxService.getTable().subscribe((res) => {
            this.msgState = res;
        })
    }

    close(){
        this.router.navigate(['/', {outlets:{propup:null}}]);
    }
}